package com.wu.backend.controller;

import com.wu.backend.entity.*;
import com.wu.backend.service.BigDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class BigDataController {

    @Autowired
    BigDataService bigDataService;

    @GetMapping("/")
    public String host(){
        return "Hello";
    }

    @GetMapping("/user_behavior")
    public List<UserBehavior> queryUserBehavior(){
        return bigDataService.queryUserBehavior();
    }

    @GetMapping("/date_stat")
    public DateStatVo queryDateStat(){
        return bigDataService.queryDateStat();
    }

    @GetMapping("/time_stat")
    public TimeStatVo queryTimeStat(){
        return bigDataService.queryTimeStat();
    }

    @GetMapping("/newEnergyChargeWeekPerson")
    public List<NewEnergyChargeWeekPerson> queryNewEnergyChargeWeekPerson(){
        return bigDataService.queryNewEnergyChargeWeekPerson();
    }

    @GetMapping("/newEnergyChargeWeekChargeTime")
    public List<NewEnergyChargeWeekChargeTime> queryNewEnergyChargeWeekChargeTime(){
        return bigDataService.queryNewEnergyChargeWeekChargeTime();
    }

    @GetMapping("/NewEnergyChargeWeek")
    public NewEnergyChargeWeekVo queryNewEnergyChargeWeek(){
        return bigDataService.queryNewEnergyChargeWeek();
    }

}